﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="UrlReplace.cs" company="Collaboris Ltd.">
//   Copyright (c) Collaboris Ltd. All rights Reserved.
// </copyright>
// <summary>
//   Defines the UrlReplace type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Collaboris.SharePoint.Wss.ContentMigration
{
    using System;
    using System.Collections.Generic;
    using System.Xml.Serialization;

    /// <summary>
    /// Represents a url replacement action that needs to occurr as part of the import process
    /// </summary>
    [Serializable]
    public class UrlReplace
    {
        #region Properties (2) 

        [XmlAttribute]
        public string NewUrl
        {
            get { return this.newUrl; }
            set { this.newUrl = value; }
        }

        [XmlAttribute]
        public string OldUrl
        {
            get { return this.oldUrl; }
            set { this.oldUrl = value; }
        }

        #endregion Properties 

        #region Fields

        private string oldUrl;
        private string newUrl;     

        #endregion

        #region Constructors

        public UrlReplace(string oldUrl, string newUrl)
        {
            this.oldUrl = oldUrl;
            this.newUrl = newUrl;
        }


        public UrlReplace()
        {
        }

        #endregion
    }

    [Serializable]
    public class UrlReplaceCollection : List<UrlReplace>
    {
    }
}